# Maintainer: Brad Fanella <cesura@archlinux.org>
# Contributor: Martin Wimpress <code@flexion.org>

pkgname=mate-control-center
pkgver=1.26.0
pkgrel=3
pkgdesc="The Control Center for MATE"
url="https://mate-desktop.org"
arch=('loong64' 'x86_64')
license=('GPL')
depends=('mate-menus' 'mate-settings-daemon' 'marco' 'libxss' 'mate-desktop'
         'gettext' 'accountsservice' 'mate-panel' 'libcanberra')
makedepends=('itstool')
groups=('mate')
conflicts=('mate-control-center-gtk3')
replaces=('mate-control-center-gtk3')
source=("https://pub.mate-desktop.org/releases/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('286714ea778f6540fe74ef00aaf504c47141518d26ab224994f4a1af36b0134a')

build() {
    cd "${pkgname}-${pkgver}"
    ./configure \
        --prefix=/usr \
        --sysconfdir=/etc \
        --sbindir=/usr/bin \
        --localstatedir=/var \
        --disable-update-mimedb

    #https://bugzilla.gnome.org/show_bug.cgi?id=656231
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    make
}

package() {
    cd "${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
    rm "${pkgdir}/usr/share/applications/mimeinfo.cache"
}

# vim:set sw=4 et:
